<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>

<form id="pagerForm" method="post" action="${ctx}/role/page" >
	<input type="hidden" name="pageNum" value="1" />
	<input type="hidden" name="pageSize" value="${page.pageSize}" />
	<input type="hidden" name="numPerPage" value="${page.pageSize}" />
</form>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="${ctx}/role/create" target="dialog" title="角色添加" width="550" height="290" mask="true"><span>添加</span></a></li>
		</ul>
	</div>
	<table class="table" width="100%" layoutH="81">
		<thead>
			<tr>
				<th align="center">序号</th>
				<th align="center">角色ID</th>
				<th align="center">角色名称</th>
				<th align="center">角色描述</th>
				<th align="center">操作</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${page.data}" var="item">
				<tr target="sid_role" rel="${item.id}">
					<td>${item.rowNum}</td>
					<td>${item.id}</td>
					<td>${item.roleName}</td>
					<td>${item.roleDesc}</td>
					<td>
					<c:if test="${item.rowNum!='1'}">
						<a title="确定要删除吗？" target="ajaxTodo" href="${ctx}/role/delete?roleId=${item.id}"  class="btnDel" >删除</a></c:if>
						<a href="${ctx}/role/update?roleId=${item.id}" target="dialog" title="角色修改" width="550" height="290"  class="btnEdit" mask="true" maxable="false"minable="false">编辑</a>
						<a href="${ctx}/role/setPermissions?roleId=${item.id}" target="dialog" title="${item.roleName}设置权限" width="600" height="430" maxable="false"minable="false" class="btnView" mask="true">设置</a>
					</td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
    <%@include file="/WEB-INF/view/commons/paging.jsp"%>
</div>
